<?php

require '../model/chongzhisetmodel.php';

class chongzhisetcontrol{
	private $model;//业务模型
	private $view;

	public function __construct(){
		
		$this->view="../view/main.php?url=chongzhiset.php";
		$this->model=new chongzhisetmodel();
	}


	public function load($view=null){
		if(empty($view))
		{				
			header("location:{$this->view}");
		}
		else{
			header("location:{$view}");
		}

	}
	
	/*
	 *
	*
	*/
	public function doAction($action){
		if($action=='cha'){			
			$this->action_chongzhisetquery();
		}
		else{
			$this->load();
		}

	}

	
	public function action_chongzhisetquery(){
		$select=$_POST['select'];
	    if (isset($select)){		
	    $chongzhiset=new  chongzhisetmodel();
	    $chongzhiset->chongzhisetquery($select);
	    //echo  $select;
		}
		$this->load("../view/main.php?url=chongzhiset.php&select=".$select);
	}
	
}




?>